From: Keir Fraser Date: Wed, 21 Oct 2009 15:07:37 +0000 (+0100) Subject: x86: Initialize the affinity field after assigning the vector. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~13188 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22Dat/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22Dat?a=commitdiff_plain;h=9cd9340a83eef7e52b0444c5d927eca149a25cc9;p=xen.git x86: Initialize the affinity field after assigning the vector. To avoid strange output from debug-key "i", desc->affinity should be the subset of the cfg->domain basically, so copy cfg->domain to desc->affinity after assigning vector for the irq.. Signed-off-by: Xiantao Zhang --- diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c index d4bf176d07..510be8db12 100644 --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -419,13 +419,16 @@ int assign_irq_vector(int irq) int ret; unsigned long flags; struct irq_cfg *cfg = &irq_cfg[irq]; + struct irq_desc *desc = irq_to_desc(irq); BUG_ON(irq >= nr_irqs || irq <0); spin_lock_irqsave(&vector_lock, flags); ret = __assign_irq_vector(irq, cfg, TARGET_CPUS); - if (!ret) + if (!ret) { ret = cfg->vector; + cpus_copy(desc->affinity, cfg->domain); + } spin_unlock_irqrestore(&vector_lock, flags); return ret; }